<template>
  <div class='container'>
     <el-dialog title="新增学科" :visible="showDialog">
      <el-form ref="deptForm" :model="formData" label-width="120px" :rules="rules">
        <el-form-item label="学科名称" prop="subjectName ">
          <el-input v-model="formData.subjectName" style="width:80%" placeholder="请输入学科名称" />
        </el-form-item>
      </el-form>
      <el-switch
        inactive-text="是否显示"
        v-model="value"
        active-color="#13ce66"
        inactive-color="#ff4949">
      </el-switch>
      <el-row slot="footer" type="flex" justify="center">
        <el-col :span="6">
          <el-button type="primary" size="small" @click="btnok">确定</el-button>
          <el-button size="small" @click="btnCancel">取消</el-button>
        </el-col>
      </el-row>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: {
    showDialog: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {
      formData: {
        subjectName: ''
      },
      value: true
    }
  }
}
</script>

<style scoped lang='less'></style>
